package cn.humaohua.study.yanmo_design_pattern.ch12.v1;


public class Reader implements Observer {
    private String name;

    public Reader(String name) {
        this.name = name;
    }

    @Override
    public void update(Subject subject) {
        System.out.println(this.name + "收到了报纸，内容是："
                + ((NewsPaper) subject).getContent());

    }

}
